Skip to content

Explicitly set clang-format PointerAlignment#353

Merged
MaartenS11 merged 1 commit intomainfrom
fix/clang-format-pointer-alignment
Apr 15, 2026
Merged

Explicitly set clang-format PointerAlignment#353
MaartenS11 merged 1 commit intomainfrom
fix/clang-format-pointer-alignment

Conversation

@MaartenS11
Copy link
Copy Markdown
Member

@MaartenS11 MaartenS11 commented Apr 15, 2026

It seems a recent clang-format change causes pointers to sometimes be left aligned while all our code uses right aligned pointers. This PR enforces right alignment at all times. Because of this change I would often have clang-format change the pointer alignment locally which then caused the CI to fail, this is now resolved.

16:32:20 ~/Projects/WARDuino fix/clang-format-pointer-alignment $ clang-format --style=google --dump-config | egrep Pointer
  AlignFunctionPointers: false
  AlignFunctionPointers: false
  AlignFunctionPointers: false
  AlignFunctionPointers: false
  AlignFunctionPointers: false
  AlignFunctionPointers: false
  AlignFunctionPointers: false
DerivePointerAlignment: false
PointerAlignment: Left                  <- Is now Left instead of Right
ReferenceAlignment: Pointer
SpaceAroundPointerQualifiers: Default

It seems a recent clang-format change causes pointers to sometimes be left aligned while all our code uses right aligned pointers. This enforces right alignment at all times.
@MaartenS11 MaartenS11 merged commit 289a289 into main Apr 15, 2026
15 checks passed
@MaartenS11 MaartenS11 deleted the fix/clang-format-pointer-alignment branch April 15, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant